package S10.first;

import java.util.Arrays;

public class F02 {

	public static void main(String[] args) {
		Shape[]cs={
			new Circle(10), 
			new Circle(5),
			new Rectangle(2, 8),
			new Rectangle(20, 10)
		};
		Arrays.sort(cs, Shape.getComparator().reversed()); //reversed是Comparator的默认方法
		for(Shape c:cs) { //显示排序后的结果
			System.out.println(c.toString());
		}

	}

}
